package test.core;

import java.io.File;

import org.junit.Test;

import hyl.core.MyFun;
import hyl.core.io.MyFileListener;
import hyl.core.io.MyPath;
import hyl.core.run.IFilter;

public class testFilelistener {
	public static void main(String[] mm) {
		test1();
	}

	public static void test1() {
		String path=MyPath.getPathOfClassLoader(testFilelistener.class.getClassLoader());
		System.out.println(path);
		
		File f=new File(path+"system.ini");
		MyFileListener fl = new MyFileListener(f);
		fl.setFileChangedEvent(3000, new IFilter<File>() {

			@Override
			public boolean where(File obj) {
				System.out.println("文件改变" + MyFun.getNow());
				return false;
			}

		});
	}

}
